<div>
	<div class="header">
		<a href="#parterpage" class="btn btnleft">返回</a>
		<h1>{{headerName}}</h1>
	</div>
	<div class="content nobottom">
		<div class="padding-top-sm" style="padding:6px;overflow-x:hidden;">
			<form class="form-horizontal loginform" id="createform{{identify}}">
				<div class="form-group first">
					<label class="col-sm-4 control-label">市场区域:</label>
					<div class="col-sm-8">
						<input type="text" name="subscribe.marketarea" value="" class="form-control" placeholder="市场区域" maxlength="20">
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-4 control-label"><span class="required">#</span>产品名称:</label>
					<div class="col-sm-8">
						<input type="text" id="subscribeproductNameKey{{identify}}" name="subscribe.productNameKey" value="" class="form-control" placeholder="产品名称" maxlength="20">
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-4 control-label">销售方式:</label>
					<div class="col-sm-8">
						<select name="subscribe.saleType" class="form-control">
							<option value="">全部</option>
							<option value="0">普通</option>
							<option value="1">促销</option>
							<option value="2">组团</option>
						</select>
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-4 control-label">公司信誉:</label>
					<div class="col-sm-8">
						<select name="subscribe.credit" class="form-control">
			 				<option value="">全部</option>
			 				<option value="1">信誉好</option>
			 				<option value="0">信誉一般</option>
						</select>
					</div>
				</div>
				<div class="form-group last">
					<div class="col-sm-12">
						<button type="submit" name="create" id="submitupdate{{identify}}" class="btn btn-default btn-lg btn-block">确认提交</button>
					</div>
				</div>
			</form>
		</div>
	</div>
	<script type="text/javascript">
		$(document).ready(function() {
			$('#submitupdate{{identify}}').on('click', function(e) {
				var $this = $(this);
				$this.attr('disabled', 'disabled');
				var v = [{
					id: 'subscribeproductNameKey{{identify}}',
					msg: '请输入产品名称'
				}];
				var vmsg = [];
				for (var i = 0; i < v.length; i++) {
					var vi = v[i];
					if ('' == $.trim($('#' + vi.id).val())) {
						vmsg[i] = vi.msg;
					}
				}
				if (vmsg.length > 0) {
					Global.longToast(vmsg.join(','));
					$this.removeAttr('disabled');
					return;
				}
				Global.loading();
				$.ajax({
					type: 'GET',
			    	url: GLOBAL_CONTEXT_PATH + '/subscribe/createJson.html?_=' + new Date().getTime(),
			    	dataType: 'json',
			    	crossDomain: true,
			    	data: $('#createform{{identify}}').serialize(),
			    	success: function (data) {
			    		data.identify = new Date().getTime();
						Global.longToast('操作成功');
			    		Global.loaded();
						Global.backHome();
			    	},
			    	error: function() {
			    		$this.removeAttr('disabled');
			    		Global.loaded();
			    	}
				});
			});
		});
	<{{!}}/script>
</div>